package com.ybkj.o2o.zhuanxian.entity;

import com.ybkj.o2o.zhuanxian.common.CustomDateSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

public class Car extends Base implements Serializable {

  /**
   * 空闲 .
   */
  public static final int CAR_FREE = 1;
  /**
   * 忙碌 .
   */
  public static final int CAR_BUSY = 2;
  
  private Long lineId;

  private String lineName;

  private Long companyId;

  private String companyName;

  private String carName;

  private String carNumber;

  private Integer status;

  private Double drivingDistance;

  @JsonSerialize(using = CustomDateSerializer.class)
  private Date buyTime;

  private Long employId;

  private String employName;

  @JsonSerialize(using = CustomDateSerializer.class)
  private Date insuranceTime;

  @JsonSerialize(using = CustomDateSerializer.class)
  private Date overhaulTime;

  private String picture;

  private String provincial;

  private String city;

  private String county;

  private String address;

  private Integer limitLine;
  
  private Long version;

  private String appKey;

  private Integer ridepeopleNumber;

  private List<Line> lines;

  private static final long serialVersionUID = 1L;

  // 三运定制要求添加的字段
  private String plateColor; // 车牌颜色

  private String brand; // 车辆厂牌

  private String vehicleType; // 车辆类型

  private String vehicleModel; // 车辆型号

  private String owner; // 所属车主

  private String bodyColor; // 车身颜色

  private String engineNo; // 车辆发动机号

  private String vin; // 车辆识别VIN码

  private String fuel; // 车辆燃料类型

  private String permitted; // 核定载客位

  @JsonSerialize(using = CustomDateSerializer.class)
  private Date registrationTime; // 注册日期

  private Integer inspectioStatus; // 年验状态 0:未年检,1:已年检

  private Integer rateType; // 运价类型 0:未知

  private String displacement; // 车辆发动机排量

  private Integer maintenanceStatus; // 车辆检修状态 0:已年检,1:已到期

  private String taxiNo; // 网络预约出租汽车运输证号

  private String taxiAgency; // 网络预约出租汽车运输证发证机构

  private String taxiRegion; // 经营区域

  @JsonSerialize(using = CustomDateSerializer.class)
  private Date validTime; // 网络预约出租汽车运输证有效期起

  @JsonSerialize(using = CustomDateSerializer.class)
  private Date invalidTime; // 网络预约出租汽车运输证有效期止

  @JsonSerialize(using = CustomDateSerializer.class)
  private Date taxiRegisterTime; // 网约车初次登记日期

  private String deviceSerial; // 网约车发票打印设备序列号

  private String deviceBrand; // 卫星定位装置品牌

  private String deviceModel; // 卫星定位装置型号

  @JsonSerialize(using = CustomDateSerializer.class)
  private Date deviceInstallTime; // 卫星定位装置安装日期

  private String insurer; // 保险公司

  private String insuranceNo; // 保险号

  private String insType; // 保险类型

  private Double insMoney; // 保险金额

  @JsonSerialize(using = CustomDateSerializer.class)
  private Date insValidTime; // 保险生效时间
  
  public String getPlateColor() {
    return plateColor;
  }

  public void setPlateColor(String plateColor) {
    this.plateColor = plateColor;
  }

  public String getBrand() {
    return brand;
  }

  public void setBrand(String brand) {
    this.brand = brand;
  }

  public String getVehicleType() {
    return vehicleType;
  }

  public void setVehicleType(String vehicleType) {
    this.vehicleType = vehicleType;
  }

  public String getVehicleModel() {
    return vehicleModel;
  }

  public void setVehicleModel(String vehicleModel) {
    this.vehicleModel = vehicleModel;
  }

  public String getOwner() {
    return owner;
  }

  public void setOwner(String owner) {
    this.owner = owner;
  }

  public String getBodyColor() {
    return bodyColor;
  }

  public void setBodyColor(String bodyColor) {
    this.bodyColor = bodyColor;
  }

  public String getEngineNo() {
    return engineNo;
  }

  public void setEngineNo(String engineNo) {
    this.engineNo = engineNo;
  }

  public String getVin() {
    return vin;
  }

  public void setVin(String vin) {
    this.vin = vin;
  }

  public String getFuel() {
    return fuel;
  }

  public void setFuel(String fuel) {
    this.fuel = fuel;
  }

  public String getPermitted() {
    return permitted;
  }

  public void setPermitted(String permitted) {
    this.permitted = permitted;
  }

  public Date getRegistrationTime() {
    return registrationTime;
  }

  public void setRegistrationTime(Date registrationTime) {
    this.registrationTime = registrationTime;
  }

  public Integer getInspectioStatus() {
    return inspectioStatus;
  }

  public void setInspectioStatus(Integer inspectioStatus) {
    this.inspectioStatus = inspectioStatus;
  }

  public Integer getRateType() {
    return rateType;
  }

  public void setRateType(Integer rateType) {
    this.rateType = rateType;
  }

  public String getDisplacement() {
    return displacement;
  }

  public void setDisplacement(String displacement) {
    this.displacement = displacement;
  }

  public Integer getMaintenanceStatus() {
    return maintenanceStatus;
  }

  public void setMaintenanceStatus(Integer maintenanceStatus) {
    this.maintenanceStatus = maintenanceStatus;
  }

  public String getTaxiNo() {
    return taxiNo;
  }

  public void setTaxiNo(String taxiNo) {
    this.taxiNo = taxiNo;
  }

  public String getTaxiAgency() {
    return taxiAgency;
  }

  public void setTaxiAgency(String taxiAgency) {
    this.taxiAgency = taxiAgency;
  }

  public String getTaxiRegion() {
    return taxiRegion;
  }

  public void setTaxiRegion(String taxiRegion) {
    this.taxiRegion = taxiRegion;
  }

  public Date getValidTime() {
    return validTime;
  }

  public void setValidTime(Date validTime) {
    this.validTime = validTime;
  }

  public Date getInvalidTime() {
    return invalidTime;
  }

  public void setInvalidTime(Date invalidTime) {
    this.invalidTime = invalidTime;
  }

  public Date getTaxiRegisterTime() {
    return taxiRegisterTime;
  }

  public void setTaxiRegisterTime(Date taxiRegisterTime) {
    this.taxiRegisterTime = taxiRegisterTime;
  }

  public String getDeviceSerial() {
    return deviceSerial;
  }

  public void setDeviceSerial(String deviceSerial) {
    this.deviceSerial = deviceSerial;
  }

  public String getDeviceBrand() {
    return deviceBrand;
  }

  public void setDeviceBrand(String deviceBrand) {
    this.deviceBrand = deviceBrand;
  }

  public String getDeviceModel() {
    return deviceModel;
  }

  public void setDeviceModel(String deviceModel) {
    this.deviceModel = deviceModel;
  }

  public Date getDeviceInstallTime() {
    return deviceInstallTime;
  }

  public void setDeviceInstallTime(Date deviceInstallTime) {
    this.deviceInstallTime = deviceInstallTime;
  }

  public String getInsurer() {
    return insurer;
  }

  public void setInsurer(String insurer) {
    this.insurer = insurer;
  }

  public String getInsuranceNo() {
    return insuranceNo;
  }

  public void setInsuranceNo(String insuranceNo) {
    this.insuranceNo = insuranceNo;
  }

  public String getInsType() {
    return insType;
  }

  public void setInsType(String insType) {
    this.insType = insType;
  }

  public Double getInsMoney() {
    return insMoney;
  }

  public void setInsMoney(Double insMoney) {
    this.insMoney = insMoney;
  }

  public Date getInsValidTime() {
    return insValidTime;
  }

  public void setInsValidTime(Date insValidTime) {
    this.insValidTime = insValidTime;
  }

  public List<Line> getLines() {
    return lines;
  }

  public void setLines(List<Line> lines) {
    this.lines = lines;
  }

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public Date getCreated() {
    return created;
  }

  public void setCreated(Date created) {
    this.created = created;
  }

  public Date getUpdated() {
    return updated;
  }

  public void setUpdated(Date updated) {
    this.updated = updated;
  }


  public Long getLineId() {
    return lineId;
  }

  public void setLineId(Long lineId) {
    this.lineId = lineId;
  }

  public String getLineName() {
    return lineName;
  }

  public void setLineName(String lineName) {
    this.lineName = lineName;
  }

  public Long getCompanyId() {
    return companyId;
  }

  public void setCompanyId(Long companyId) {
    this.companyId = companyId;
  }

  public String getCompanyName() {
    return companyName;
  }

  public void setCompanyName(String companyName) {
    this.companyName = companyName == null ? null : companyName.trim();
  }

  public String getCarName() {
    return carName;
  }

  public void setCarName(String carName) {
    this.carName = carName == null ? null : carName.trim();
  }

  public String getCarNumber() {
    return carNumber;
  }

  public void setCarNumber(String carNumber) {
    this.carNumber = carNumber == null ? null : carNumber.trim();
  }

  public Integer getStatus() {
    return status;
  }

  public void setStatus(Integer status) {
    this.status = status;
  }


  public Double getDrivingDistance() {
    return drivingDistance;
  }

  public void setDrivingDistance(Double drivingDistance) {
    this.drivingDistance = drivingDistance;
  }

  public Date getBuyTime() {
    return buyTime;
  }

  public void setBuyTime(Date buyTime) {
    this.buyTime = buyTime;
  }

  public Long getEmployId() {
    return employId;
  }

  public void setEmployId(Long employId) {
    this.employId = employId;
  }

  public String getEmployName() {
    return employName;
  }

  public void setEmployName(String employName) {
    this.employName = employName == null ? null : employName.trim();
  }

  public Date getInsuranceTime() {
    return insuranceTime;
  }

  public void setInsuranceTime(Date insuranceTime) {
    this.insuranceTime = insuranceTime;
  }

  public Date getOverhaulTime() {
    return overhaulTime;
  }

  public void setOverhaulTime(Date overhaulTime) {
    this.overhaulTime = overhaulTime;
  }

  public String getPicture() {
    return picture;
  }

  public void setPicture(String picture) {
    this.picture = picture == null ? null : picture.trim();
  }

  public String getProvincial() {
    return provincial;
  }

  public void setProvincial(String provincial) {
    this.provincial = provincial == null ? null : provincial.trim();
  }

  public String getCity() {
    return city;
  }

  public void setCity(String city) {
    this.city = city == null ? null : city.trim();
  }

  public String getCounty() {
    return county;
  }

  public void setCounty(String county) {
    this.county = county == null ? null : county.trim();
  }

  public String getAddress() {
    return address;
  }

  public void setAddress(String address) {
    this.address = address == null ? null : address.trim();
  }

  public Integer getLimitLine() {
    return limitLine;
  }

  public void setLimitLine(Integer limitLine) {
    this.limitLine = limitLine;
  }

  public Long getVersion() {
    return version;
  }

  public void setVersion(Long version) {
    this.version = version;
  }

  public String getAppKey() {
    return appKey;
  }

  public void setAppKey(String appKey) {
    this.appKey = appKey == null ? null : appKey.trim();
  }

  public Integer getRidepeopleNumber() {
    return ridepeopleNumber;
  }

  public void setRidepeopleNumber(Integer ridepeopleNumber) {
    this.ridepeopleNumber = ridepeopleNumber;
  }

  @Override
  public boolean equals(Object that) {
    if (this == that) {
      return true;
    }
    if (that == null) {
      return false;
    }
    if (getClass() != that.getClass()) {
      return false;
    }
    Car other = (Car) that;
    return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
        && (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(
            other.getCreated()))
        && (this.getUpdated() == null ? other.getUpdated() == null : this.getUpdated().equals(
            other.getUpdated()))
        && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId()
            .equals(other.getCompanyId()))
        && (this.getCompanyName() == null ? other.getCompanyName() == null : this.getCompanyName()
            .equals(other.getCompanyName()))
        && (this.getCarName() == null ? other.getCarName() == null : this.getCarName().equals(
            other.getCarName()))
        && (this.getCarNumber() == null ? other.getCarNumber() == null : this.getCarNumber()
            .equals(other.getCarNumber()))
        && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(
            other.getStatus()))
        && (this.getDrivingDistance() == null ? other.getDrivingDistance() == null : this
            .getDrivingDistance().equals(other.getDrivingDistance()))
        && (this.getBuyTime() == null ? other.getBuyTime() == null : this.getBuyTime().equals(
            other.getBuyTime()))
        && (this.getEmployId() == null ? other.getEmployId() == null : this.getEmployId().equals(
            other.getEmployId()))
        && (this.getEmployName() == null ? other.getEmployName() == null : this.getEmployName()
            .equals(other.getEmployName()))
        && (this.getInsuranceTime() == null ? other.getInsuranceTime() == null : this
            .getInsuranceTime().equals(other.getInsuranceTime()))
        && (this.getOverhaulTime() == null ? other.getOverhaulTime() == null : this
            .getOverhaulTime().equals(other.getOverhaulTime()))
        && (this.getPicture() == null ? other.getPicture() == null : this.getPicture().equals(
            other.getPicture()))
        && (this.getProvincial() == null ? other.getProvincial() == null : this.getProvincial()
            .equals(other.getProvincial()))
        && (this.getCity() == null ? other.getCity() == null : this.getCity().equals(
            other.getCity()))
        && (this.getCounty() == null ? other.getCounty() == null : this.getCounty().equals(
            other.getCounty()))
        && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(
            other.getAddress()))
        && (this.getVersion() == null ? other.getVersion() == null : this.getVersion().equals(
            other.getVersion()))
        && (this.getAppKey() == null ? other.getAppKey() == null : this.getAppKey().equals(
            other.getAppKey()))
        && (this.getRidepeopleNumber() == null ? other.getRidepeopleNumber() == null : this
            .getRidepeopleNumber().equals(other.getRidepeopleNumber()));
  }

  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
    result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
    result = prime * result + ((getUpdated() == null) ? 0 : getUpdated().hashCode());
    result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
    result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode());
    result = prime * result + ((getCarName() == null) ? 0 : getCarName().hashCode());
    result = prime * result + ((getCarNumber() == null) ? 0 : getCarNumber().hashCode());
    result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
    result =
        prime * result + ((getDrivingDistance() == null) ? 0 : getDrivingDistance().hashCode());
    result = prime * result + ((getBuyTime() == null) ? 0 : getBuyTime().hashCode());
    result = prime * result + ((getEmployId() == null) ? 0 : getEmployId().hashCode());
    result = prime * result + ((getEmployName() == null) ? 0 : getEmployName().hashCode());
    result = prime * result + ((getInsuranceTime() == null) ? 0 : getInsuranceTime().hashCode());
    result = prime * result + ((getOverhaulTime() == null) ? 0 : getOverhaulTime().hashCode());
    result = prime * result + ((getPicture() == null) ? 0 : getPicture().hashCode());
    result = prime * result + ((getProvincial() == null) ? 0 : getProvincial().hashCode());
    result = prime * result + ((getCity() == null) ? 0 : getCity().hashCode());
    result = prime * result + ((getCounty() == null) ? 0 : getCounty().hashCode());
    result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
    result = prime * result + ((getVersion() == null) ? 0 : getVersion().hashCode());
    result = prime * result + ((getAppKey() == null) ? 0 : getAppKey().hashCode());
    result =
        prime * result + ((getRidepeopleNumber() == null) ? 0 : getRidepeopleNumber().hashCode());
    return result;
  }

  @Override
  public String toString() {
    return "Car [lineId=" + lineId + ", lineName=" + lineName + ", companyId=" + companyId
        + ", companyName=" + companyName + ", carName=" + carName + ", carNumber=" + carNumber
        + ", status=" + status + ", drivingDistance=" + drivingDistance + ", buyTime=" + buyTime
        + ", employId=" + employId + ", employName=" + employName 
        + ", insuranceTime=" + insuranceTime + ", overhaulTime=" + overhaulTime + ", picture="
        + picture + ", provincial=" + provincial + ", city=" + city + ", county=" + county
        + ", address=" + address + ", version=" + version + ", appKey=" + appKey
        + ", ridepeopleNumber=" + ridepeopleNumber + ", lines=" + lines + "]";
  }


}
